<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>Class: Retreval::User</title>

	<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />

	<script src="../js/jquery.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/thickbox-compressed.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/quicksearch.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/darkfish.js" type="text/javascript"
		charset="utf-8"></script>

</head>
<body class="class">

	<div id="metadata">
		<div id="home-metadata">
			<div id="home-section" class="section">
        <h3 class="section-header">
          <a href="../index.html">Home</a>
          <a href="../index.html#classes">Classes</a>
          <a href="../index.html#methods">Methods</a>
        </h3>
			</div>
		</div>

		<div id="file-metadata">
			<div id="file-list-section" class="section">
				<h3 class="section-header">In Files</h3>
				<div class="section-body">
					<ul>
					
						<li><a href="../lib/retreval/gold_standard_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
							class="thickbox" title="lib/retreval/gold_standard.rb">lib/retreval/gold_standard.rb</a></li>
					
					</ul>
				</div>
			</div>

			
		</div>

		<div id="class-metadata">

			<!-- Parent Class -->
			
			<div id="parent-class-section" class="section">
				<h3 class="section-header">Parent</h3>
				
				<p class="link">Object</p>
				
			</div>
			

			<!-- Namespace Contents -->
			

			<!-- Method Quickref -->
			
			<div id="method-list-section" class="section">
				<h3 class="section-header">Methods</h3>
				<ul class="link-list">
					
					<li><a href="#method-c-new">::new</a></li>
					
					<li><a href="#method-i-%3D%3D">#==</a></li>
					
					<li><a href="#method-i-add_judgement">#add_judgement</a></li>
					
				</ul>
			</div>
			

			<!-- Included Modules -->
			
		</div>

		<div id="project-metadata">
			
			
			<div id="fileindex-section" class="section project-section">
				<h3 class="section-header">Files</h3>
				<ul>
				
					<li class="file"><a href="../CHANGELOG.html">CHANGELOG</a></li>
				
					<li class="file"><a href="../TODO.html">TODO</a></li>
				
				</ul>
			</div>
			

			<div id="classindex-section" class="section project-section">
				<h3 class="section-header">Class Index
					<span class="search-toggle"><img src="../images/find.png"
						height="16" width="16" alt="[+]"
						title="show/hide quicksearch" /></span></h3>
				<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
				<fieldset>
					<legend>Quicksearch</legend>
					<input type="text" name="quicksearch" value=""
						class="quicksearch-field" />
				</fieldset>
				</form>

				<ul class="link-list">
				
					<li><a href="../Retreval.html">Retreval</a></li>
				
					<li><a href="../Retreval/Document.html">Retreval::Document</a></li>
				
					<li><a href="../Retreval/GoldStandard.html">Retreval::GoldStandard</a></li>
				
					<li><a href="../Retreval/Judgement.html">Retreval::Judgement</a></li>
				
					<li><a href="../Retreval/Options.html">Retreval::Options</a></li>
				
					<li><a href="../Retreval/Query.html">Retreval::Query</a></li>
				
					<li><a href="../Retreval/QueryResult.html">Retreval::QueryResult</a></li>
				
					<li><a href="../Retreval/QueryResultSet.html">Retreval::QueryResultSet</a></li>
				
					<li><a href="../Retreval/RankedQueryResult.html">Retreval::RankedQueryResult</a></li>
				
					<li><a href="../Retreval/ResultDocument.html">Retreval::ResultDocument</a></li>
				
					<li><a href="../Retreval/Runner.html">Retreval::Runner</a></li>
				
					<li><a href="../Retreval/UnrankedQueryResult.html">Retreval::UnrankedQueryResult</a></li>
				
					<li><a href="../Retreval/User.html">Retreval::User</a></li>
				
					<li><a href="../TestGoldStandard.html">TestGoldStandard</a></li>
				
					<li><a href="../TestQueryResult.html">TestQueryResult</a></li>
				
				</ul>
				<div id="no-class-search-results" style="display: none;">No matching classes.</div>
			</div>

			
		</div>
	</div>

	<div id="documentation">
		<h1 class="class">Retreval::User</h1>

		<div id="description">
			<p>
A <a href="User.html">User</a> is optional for a <a
href="Judgement.html">Judgement</a>, they are identified by their ID, which
could be anything.
</p>

		</div>

		<!-- Constants -->
		

		<!-- Attributes -->
		
		<div id="attribute-method-details" class="method-section section">
			<h3 class="section-header">Attributes</h3>

			
			<div id="id-attribute-method" class="method-detail">
				<a name="id"></a>
				
				<div class="method-heading attribute-method-heading">
					<span class="method-name">id</span><span
						class="attribute-access-type">[R]</span>
				</div>

				<div class="method-description">
				
				
				
				</div>
			</div>
			
			<div id="judgements-attribute-method" class="method-detail">
				<a name="judgements"></a>
				
				<div class="method-heading attribute-method-heading">
					<span class="method-name">judgements</span><span
						class="attribute-access-type">[R]</span>
				</div>

				<div class="method-description">
				
				
				
				</div>
			</div>
			
		</div>
		

		<!-- Methods -->
		
		<div id="public-class-method-details" class="method-section section">
			<h3 class="section-header">Public Class Methods</h3>

		
			<div id="new-method" class="method-detail ">
				<a name="method-c-new"></a>

				<div class="method-heading">
				
					<span class="method-name">new</span><span
						class="method-args">(args)</span>
					<span class="method-click-advice">click to toggle source</span>
				
				</div>

				<div class="method-description">
					
					<p>
Creates a new <a href="User.html">User</a> object with a specified id
</p>
					

					
					<div class="method-source-code"
						id="new-source">
<pre>
     <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 405</span>
405:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
406:       <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:id</span>]
407:       <span class="ruby-ivar">@judgements</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
408:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Can not construct a User with an empty identifier&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@id</span>.<span class="ruby-identifier">nil?</span> 
409:     <span class="ruby-keyword kw">end</span></pre>
					</div>
					
				</div>

				

				
			</div>

		
		</div>
	
		<div id="public-instance-method-details" class="method-section section">
			<h3 class="section-header">Public Instance Methods</h3>

		
			<div id="--method" class="method-detail ">
				<a name="method-i-%3D%3D"></a>

				<div class="method-heading">
				
					<span class="method-name">==</span><span
						class="method-args">(user)</span>
					<span class="method-click-advice">click to toggle source</span>
				
				</div>

				<div class="method-description">
					
					<p>
Compares two <a href="User.html">User</a> objects according to their id
</p>
					

					
					<div class="method-source-code"
						id="--source">
<pre>
     <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 399</span>
399:     <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">user</span>)
400:       <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>
401:     <span class="ruby-keyword kw">end</span></pre>
					</div>
					
				</div>

				

				
			</div>

		
			<div id="add-judgement-method" class="method-detail ">
				<a name="method-i-add_judgement"></a>

				<div class="method-heading">
				
					<span class="method-name">add_judgement</span><span
						class="method-args">(judgement)</span>
					<span class="method-click-advice">click to toggle source</span>
				
				</div>

				<div class="method-description">
					
					<p>
Adds a reference to a <a href="Judgement.html">Judgement</a> to this <a
href="User.html">User</a> object, since this makes it  easier to calculate
kappa later. Some users have multiple judgements for the same <a
href="Document.html">Document</a> <a href="Query.html">Query</a> pair,
which isn&#8217;t really helpful. We therefore eliminate duplicates.
</p>
					

					
					<div class="method-source-code"
						id="add-judgement-source">
<pre>
     <span class="ruby-comment cmt"># File lib/retreval/gold_standard.rb, line 416</span>
416:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_judgement</span>(<span class="ruby-identifier">judgement</span>)
417:       <span class="ruby-ivar">@judgements</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">judgement</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@judgements</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">judgement</span>)
418:     <span class="ruby-keyword kw">end</span></pre>
					</div>
					
				</div>

				

				
			</div>

		
		</div>
	

	</div>


	<div id="rdoc-debugging-section-dump" class="debugging-section">
	
		<p>Disabled; run with --debug to generate this.</p>
	
	</div>

	<div id="validator-badges">
		<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
		<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
			Rdoc Generator</a> 1.1.6</small>.</p>
	</div>

</body>
</html>

